<?php
class Hoc_vien extends Hocvien{
   static function chekRegister(){
        $userCurrent = Yii::app()->user->id;
        $criteria = new CDbCriteria();
        $criteria->condition='user_id='.$userCurrent;
        $name = Hocvien::model()->findAll($criteria);
        if($name != null){
            return false;
        }else{
            return true;
        }
    } 
}
?>